import { createRouter, createWebHashHistory } from 'vue-router'
import Login from '../views/basic/Login.vue'
import Register from "@/views/basic/Register";

const routes = [
  {
    path: '/login',
    name: 'Login',
    component: Login,
    meta:{
      title:'登录'
    }
  },
  {
    path: '/register',
    name: 'Register',
    component: Register,
    meta:{
      title:'注册'
    }
  },
  {
    path: '/',
    name: 'Home',
    component: ()=>import('../views/Home')
  },
  {
    path: '/user',
    name: 'User',
    component: ()=>import('../views/User')
  },
  {
    path: '/questions',
    name: 'Questions',
    component: ()=>import('../views/Questions')
  },
  {
    path: '/teams',
    name: 'Teams',
    component: ()=>import('../views/Teams')
  },
  {
    path: '/competitions',
    name: 'Competitions',
    component: ()=>import('../views/Competitions')
  },
  {
    path: '/questions/question',
    name: 'Question',
    component: ()=>import('../views/Question')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
